package Third;

import javax.sound.midi.Soundbank;
import java.net.Socket;
import java.util.Scanner;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;

/**
 * @author 长风无言
 */
public class CopyThreadTest {

    public static void main(String[] args) {

        //创建线程池
        ExecutorService executorService = Executors.newFixedThreadPool(10);
        //创建新线程
        CopyThread thread = new CopyThread();
        Scanner sc = new Scanner(System.in);
        System.out.println("请输入欲复制的目录路径：");
        //输入旧目录
        String oldPath = sc.next();
        System.out.println("请输入目的路径：");
        //输入新目录
        String newPath = sc.next();
        //传入路径
        thread.setNewPath(newPath);
        thread.setOldPath(oldPath);
        //启动线程
        executorService.submit(thread);
        executorService.shutdown();
    }
}
